package com.hutu.utils;
/**
 * 判断用户是否登陆过
 */
public class UserThreadLocal {

    private static final ThreadLocal<Long> LOCAL = new ThreadLocal<>();

    private UserThreadLocal() {

    }

    /**
     * 将loginUserVO放到ThreadLocal中
     *
     */
    public static void set(Long userId) {
        LOCAL.set(userId);
    }

    /**
     * 从ThreadLocal中获取authUserInfo
     */
    public static Long get() {
        return LOCAL.get();
    }

    /**
     * 从当前线程中删除authUserInfo
     */
    public static void remove() {
        LOCAL.remove();
    }


}
